﻿using System.Linq;


namespace RaceList.activity.help
{
    public partial class RelayQuery
    {
        public static bool ExistUser(int userId)
        {
            ipowdb_suibian_webDataContext db = ConnHelper.ipowdb_suibian_web();
            return db.WeixinUser.Count(s => s.Id == userId) > 0;
        }

        public static bool ExistUser(string openId)
        {
            ipowdb_suibian_webDataContext db = ConnHelper.ipowdb_suibian_web();
            return db.WeixinUser.Count(s => s.OpenId == openId) > 0;
        }

        public static IQueryable<WeixinUser> GetUsers()
        {
            ipowdb_suibian_webDataContext db = ConnHelper.ipowdb_suibian_web();
            return db.WeixinUser;
        }
    }
}